﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace CharacterTrailClient.Message
{
    public class MsgBox
    {
        public static void ShowInfomation(string msg)
        {
            XtraMessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        public static void ShowWarning(string msg)
        {
            XtraMessageBox.Show(msg, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
        }

        public static void ShowError(string msg)
        {
            XtraMessageBox.Show(msg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static void ShowError(IWin32Window owner,string msg )
        {
            XtraMessageBox.Show(owner, msg, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
        }

        public static bool ShowYesOrNo(string msg)
        {
            return DialogResult.Yes == XtraMessageBox.Show(msg, "提问", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
        }

        public static bool ShowOkOrCancel(string msg)
        {
            return DialogResult.OK == XtraMessageBox.Show(msg, "提问", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);
        }
    }
}
